-
Notifications
You must be signed in to change notification settings - Fork 38.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ensure TaintBasedEviction int test not rely on TaintNodeByConditions #84036
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Huang-Wei The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@@ -381,7 +381,8 @@ func nodeTainted(cs clientset.Interface, nodeName string, taints []v1.Taint) wai | |||
return false, err | |||
} | |||
|
|||
if len(taints) != len(node.Spec.Taints) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In terms of the testcase, if both TaintBasedEviction and TaintNodeByCondtions are enabled, there should be at least 2 taints (NotReady:NoExecute
and NotReady:NoSchedule
) applied, so comparing the size is absolutely incorrect.
And also the comment said "contain", the old logic doesn't follow either.
/retest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
Thanks for the update, this test has been bugging me |
@Huang-Wei do you know if this change will fix #83321? |
@damemi Probably. The old testing logic actually was based on an enabled TaintNodeByCondition flag, while composing the node lifecycle manager by disabling it - which is inconsistent, so might cause issues. Let see how the test goes, it it still flakes, the most suspicious things could be the node lifecycle controller resync/gracePeriod settings, or the admission settings. |
@Huang-Wei thanks, I did notice before that TaintNodeByCondition was disabled, and reading through the code assumed this was intentional (as the exact taint we were expecting is added by TaintBasedEvictions) |
What type of PR is this?
A followup on #82703 (comment)
What this PR does / why we need it:
Right now, the TaintBasedEviction integration test relies on setting TaintNodeByConditions to false, which is not a reasonable assumption.
Which issue(s) this PR fixes:
Prerequisite of #82703.
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
/sig scheduling
/cc @draveness @ahg-g
/kind bug